package com.hoppinzq.service.bean;

import com.hoppinzq.service.common.HoppinInvocationRequest;
import com.hoppinzq.service.common.HoppinInvocationResponse;
import com.hoppinzq.service.serializer.CustomSerializer;
import com.hoppinzq.service.transport.HoppinRPCProvider;
import com.hoppinzq.service.transport.HoppinRPCSession;

import java.io.Serializable;
import java.util.Map;

/**
 * @author zhangqi
 * 一次rpc调用的细节的封装
 */
public class RPCBean implements Serializable {
    private static final long serialVersionUID = 1L;

    private HoppinInvocationRequest hoppinInvocationRequest;
    private HoppinInvocationResponse hoppinInvocationResponse;
    private Map headers;
    private HoppinRPCProvider provider;
    private HoppinRPCSession session;
    private Class<? extends CustomSerializer> serializable;
    private Object proxy;
    private String method;
    private Object[] args;
    private String exception;

    public Map getHeaders() {
        return headers;
    }

    public void setHeaders(Map headers) {
        this.headers = headers;
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }

    public HoppinInvocationRequest getInvocationRequest() {
        return hoppinInvocationRequest;
    }

    public void setInvocationRequest(HoppinInvocationRequest hoppinInvocationRequest) {
        this.hoppinInvocationRequest = hoppinInvocationRequest;
    }

    public HoppinInvocationResponse getInvocationResponse() {
        return hoppinInvocationResponse;
    }

    public void setInvocationResponse(HoppinInvocationResponse hoppinInvocationResponse) {
        this.hoppinInvocationResponse = hoppinInvocationResponse;
    }

    public HoppinRPCProvider getProvider() {
        return provider;
    }

    public void setProvider(HoppinRPCProvider provider) {
        this.provider = provider;
    }

    public HoppinRPCSession getSession() {
        return session;
    }

    public void setSession(HoppinRPCSession session) {
        this.session = session;
    }

    public Object getProxy() {
        return proxy;
    }

    public void setProxy(Object proxy) {
        this.proxy = proxy;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public Object[] getArgs() {
        return args;
    }

    public void setArgs(Object[] args) {
        this.args = args;
    }

    public Class<? extends CustomSerializer> getSerializable() {
        return serializable;
    }

    public void setSerializable(Class<? extends CustomSerializer> serializable) {
        this.serializable = serializable;
    }
}
